1. Field of the Invention
The present invention relates to an image processing apparatus for use as a CG (Computer Graphics) processing apparatus for mapping a texture image onto a shaped surface such as a polygon, a quadratic surface, or the like to render a shape having a pattern or a texture, especially a surface irregularity texture, a recording medium storing a program for such an image processing process, and such a program.
2. Description of the Related Art
One rendering technique known as bump mapping produces the appearance of a nonsmooth surface by angularly perturbing the vectors of normals that represent the gradients of small facets that jointly make up a smooth surface.
Bump mapping is advantageous because it can produce a sufficiently irregular texture without performing calculations to input complex shapes.
However, the conventional bump mapping process is complicated in that it needs to be implemented by perturbing the normal vector of each small facet.
Another problem of the conventional bump mapping process is that it fails to express the texture of a mirror or metal surface which has surface irregularities.
It is therefore an object of the present invention to provide an image processing apparatus, a recording medium, and a program which make it possible to express a nonsmooth surface with a simple arrangement or processing sequence.
Another object of the present invention is to provide an image processing apparatus, a recording medium, and a program which make it possible to a special image easily with a simple arrangement.
Still another object of the present invention is to provide an image processing apparatus, a recording medium, and a program which are capable of expressing the texture of a mirror or metal surface which has surface irregularities.
According to an aspect of the present invention, there is provided an apparatus for processing an image, comprising original texture image storing means for storing an original texture image, gray pattern image storing means for storing a gray pattern image having differently shaped regions in different positions, and texture image generating means for combining the original texture image and the gray pattern image with each other thereby to generate a texture image.
The texture image generating means combines the original texture image and the gray pattern image with each other thereby to generate a texture image. The texture image thus generated represents the original texture image as modulated by the shades of the gray pattern image. As a result, a special image can easily be generated with a simple arrangement or processing sequence.
The original texture image may alternatively be combined with a reversed gray pattern image having pixel shades which are a reversal of pixel shades of the gray pattern image.
The original texture image may further alternatively be combined with both a gray pattern image having differently shaped regions in different positions and a reversed gray pattern image having pixel shades which are a reversal of pixel shades of the gray pattern image. The texture image generating means combines the original texture image with either one of the gray pattern image and the reversed gray pattern image to generate a first combined image, thereafter combines an image produced by enlarging the original texture image with the other one of the gray pattern image and the reversed gray pattern image to generate a second combined image, and combines the first combined image and the second combined image with each other to generate the texture image.
The texture image thus generated is capable of expressing the texture of a nonsmooth mirror or metal surface.
The texture image generating means may enlarge the original texture image according to a value calculated based on at least one of the direction of a normal vector, the direction of a line-of-sight vector, and the direction of an imaginary light source vector, of a shaped surface onto which the texture image is mapped. The shaped surface thus represents a realistic nonsmooth surface. The shaped surface may be a polygon, a quadratic surface, or the like.
If the original texture image is combined with both a gray pattern image having differently shaped regions in different positions and a reversed gray pattern image having pixel shades which are a reversal of pixel shades of the gray pattern image, then the texture image generating means combines the original texture image with either one of the gray pattern image and the reversed gray pattern image to generate a first combined image, thereafter combines an image produced by positionally displacing the original texture image with the other one of the gray pattern image which is positionally displaced and the reversed gray pattern image which is positionally displaced to generate a second combined image, and combines the first combined image and the second combined image with each other to generate the texture image.
The texture image thus generated is capable of expressing the texture of a nonsmooth surface which reflects light by way of diffuse reflection.
The texture image generating means may positionally displace the original texture image according to a value calculated based on at least one of the direction of a normal vector, the direction of a line-of-sight vector, and the direction of an imaginary light source vector, of a shaped surface onto which the texture image is mapped. The shaped surface thus represents a realistic nonsmooth surface. The shaped surface may be a polygon, a quadratic surface, or the like.
According another aspect of the present invention, there is provided a recording medium storing a program, the program comprising the steps of reading an original texture image and a gray pattern image having differently shaped regions in different positions, and combining the original texture image and the gray pattern image to generate a texture image.
The original texture image and the gray pattern image having differently shaped regions in different positions are combined with each other to generate a texture image. The texture image thus generated represents the original texture image as modulated by the shades of the gray pattern image. As a result, a special image can easily be generated with a simple arrangement.
In the program stored in the recording medium, the original texture image may alternatively be combined with a reversed gray pattern image having pixel shades which are a reversal of pixel shades of the gray pattern image.
In the program stored in the recording medium, the original texture image may further alternatively be combined with both a gray pattern image having differently shaped regions in different positions and a reversed gray pattern image having pixel shades which are a reversal of pixel shades of the gray pattern image. The original texture image is combined with either one of the gray pattern image and the reversed gray pattern image to generate a first combined image, thereafter an image produced by enlarging the original texture image is combined with the other one of the gray pattern image and the reversed gray pattern image to generate a second combined image, and the first combined image and the second combined image are combined with each other to generate the texture image.
The texture image thus generated is capable of expressing the texture of a nonsmooth mirror or metal surface.
The original texture image may be enlarged according to a value calculated based on at least one of the direction of a normal vector, the direction of a line-of-sight vector, and the direction of an imaginary light source vector, of a shaped surface onto which the texture image is mapped. The shaped surface thus represents a realistic nonsmooth surface. The shaped surface may be a polygon, a quadratic surface, or the like.
If the original texture image is combined with both a gray pattern image having differently shaped regions in different positions and a reversed gray pattern image having pixel shades which are a reversal of pixel shades of the gray pattern image, then the original texture image is combined with either one of the gray pattern image and the reversed gray pattern image to generate a first combined image, thereafter an image produced by positionally displacing the original texture image is combined with the other one of the gray pattern image which is positionally displaced and the reversed gray pattern image which is positionally displaced to generate a second combined image, and the first combined image and the second combined image are combined with each other to generate the texture image.
The texture image thus generated is capable of expressing the texture of a nonsmooth surface which reflects light by way of diffuse reflection.
The original texture image may be positionally displaced according to a value calculated based on at least one of the direction of a normal vector, the direction of a line-of-sight vector, and the direction of an imaginary light source vector, of a shaped surface onto which the texture image is mapped. The shaped surface thus represents a realistic nonsmooth surface. The shaped surface may be a polygon, a quadratic surface, or the like.
According to still another aspect of the present invention, there is provided a program comprising the steps of reading an original texture image and a reversed gray pattern image having pixel shades which are a reversal of pixel shades of a gray pattern image having differently shaped regions in different positions, and combining the original texture image and the reversed gray pattern image to generate a texture image.
In the above program, the texture image which is generated by combining the original texture image and the reversed gray pattern image represents the original texture image as modulated by the shades of the gray pattern image. As a result, a special image can easily be generated with a simple arrangement.
According to yet another aspect of the present invention, there is provided an apparatus for processing an image, comprising original texture image storing means for storing an original texture image, original texture image processing means for processing the original texture image to generate a processed original texture image, gray pattern image storing means for storing a gray pattern image having differently shaped regions in different positions, gray pattern image processing means for processing the gray pattern image to generate a processed gray pattern image, and texture image generating means for combining the original texture image or the processed texture image with the gray pattern image and/or the processed gray pattern image to generate a texture image.
In the above apparatus, the texture image generated by the texture image generating means represents an image whose shades are variously modulated which is produced by combining the original texture image or the processed texture image with the gray pattern image and/or the processed gray pattern image. Consequently, a more special image can easily be generated with a relatively simple arrangement.
The original texture image processing means may enlarge and/or positionally displace the original texture image to generate the processed original texture image, and the gray pattern image processing means may perform at least one of processes of converting the shades of the gray pattern image according to a shade converting algorithm, enlarging the gray pattern image, and positionally displacing the gray pattern image to generate the processed gray pattern image. The original texture image may be enlarged at an enlargement ratio including xc3x971.
According to yet still another aspect of the present invention, there is provided a recording medium storing a program, the program comprising the steps of reading an original texture image and a gray pattern image having differently shaped regions in different positions, processing the original texture image to generate a processed original texture image, processing the gray pattern image to generate a processed gray pattern image, and combining the original texture image or the processed texture image with the gray pattern image and/or the processed gray pattern image to generate a texture image.
In the program stored in the above recording medium, the texture image thus generated represents an image whose shades are variously modulated which is produced by combining the original texture image or the processed texture image with the gray pattern image and/or the processed gray pattern image. Consequently, a more special image can easily be generated with a relatively simple arrangement.
The step of processing the original texture image may comprise the step of enlarging and/or positionally displacing the original texture image to generate the processed original texture image, and the step of processing the gray pattern image may comprise the step of performing at least one of processes of converting the shades of the gray pattern image according to a shade converting algorithm, enlarging the gray pattern image, and positionally displacing the gray pattern image to generate the processed gray pattern image. The original texture image may be enlarged at an enlargement ratio including xc3x971.
According to a further aspect of the present invention, there is provided a program comprising the steps of reading an original texture image and a gray pattern image having differently shaped regions in different positions, processing the original texture image to generate a processed original texture image, processing the gray pattern image to generate a processed gray pattern image, and combining the original texture image or the processed texture image with the gray pattern image and/or the processed gray pattern image to generate a texture image.
In the above program, the texture image thus generated represents an image whose shades are variously modulated which is produced by combining the original texture image or the processed texture image with the gray pattern image and/or the processed gray pattern image. Consequently, a more special image can easily be generated with a relatively simple arrangement.
In the above program, the step of processing the original texture image may comprise the step of enlarging and/or positionally displacing the original texture image to generate the processed original texture image, and the step of processing the gray pattern image may comprise the step of performing at least one of processes of converting the shades of the gray pattern image according to a shade converting algorithm, enlarging the gray pattern image, and positionally displacing the gray pattern image to generate the processed gray pattern image. The original texture image may be enlarged at an enlargement ratio including xc3x971.